package pub_objects

import "venus/util/zjson"

type User struct {
	Uuid         int64  // 账号Id
	Account      string // 账号
	Password     string // 密码
	Token        string // 验证码
	TimeRegister int64  // 注册时间(ms)
	TimeLogin    int64  // 上次登录时间(ms)
}

func NewUser(account string) *User {
	return &User{Account: account}
}

func (user *User) TableName() (text string) {
	return "users"
}

func (user *User) DbKey() (text string) {
	return user.Account
}

func (user *User) ToString() (text string) {
	text = zjson.Str(user)
	return
}
